package com.sanji.sjmallmodule.account;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.sanji.sjmallapp.BaseActivity;
import com.sanji.sjmallapp.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 个人中心
 */

public class PersonCenterActivity extends BaseActivity implements View.OnClickListener {
    @BindView(R.id.common_back_img)
    ImageView commonBackImg;
    @BindView(R.id.common_left_tv)
    TextView commonLeftTv;
    @BindView(R.id.account_management_tv)
    TextView accountManagementTv;
    @BindView(R.id.person_info_tv)
    TextView personInfoTv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_person_center_info);
        ButterKnife.bind(this);
        initView();
    }

    public void initView() {
        commonLeftTv.setText(getString(R.string.person_center));
        commonBackImg.setOnClickListener(this);
        accountManagementTv.setOnClickListener(this);
        personInfoTv.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.common_back_img:
                finish();
                break;
            case R.id.account_management_tv:
                //账号管理
                intent = new Intent(this, AccountManagmentActivity.class);
                startActivity(intent);
                break;
            case R.id.person_info_tv:
                //用户信息
                intent = new Intent(this, PersonInfoActivity.class);
                startActivity(intent);
                break;
        }
    }
}
